/**
 * 
 */
package com.ez.supervise.service.impl;

import java.util.List;

import com.ez.supervise.core.Page;
import com.ez.supervise.dao.OrgDemocracySumDao;
import com.ez.supervise.model.biz.OrgDemocracySum;
import com.ez.supervise.service.OrgDemocracySumService;

/**
 * @author searph.wang
 * @email searph.wang@gmail.com
 * @Created at 2009-7-22
 * 
 */
public class OrgDemocracySumServiceImpl implements OrgDemocracySumService {
    private OrgDemocracySumDao orgDemocracySumDao;

    // public int update(OrgDemocracySum org) {
    // return sqlMapClientTemplate.update("sys.updateOrgDemocracySum", org);
    // }

    public void setOrgDemocracySumDao(OrgDemocracySumDao orgDemocracySumDao) {
	this.orgDemocracySumDao = orgDemocracySumDao;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#delete(java.lang.Long)
     */
    public void delete(Long id) {
	orgDemocracySumDao.delete(id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#insert(java.lang.Object)
     */
    public void insert(Object entity) {
	orgDemocracySumDao.insert(entity);

    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#update(java.lang.Object)
     */
    public void update(Object entity) {
	orgDemocracySumDao.update(entity);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.base.BaseService#get(java.lang.Long)
     */
    public Object get(Long id) {
	return (OrgDemocracySum) orgDemocracySumDao.get(id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * com.ez.supervise.service.OrgDemocracySumService#findByPage(com.ez.supervise.core.
     * Page)
     */
    public Page findByPage(Page page) {
	page.setRoot(orgDemocracySumDao.findByPage(page));
	page.setTotalProperty(orgDemocracySumDao.findByCount(page));
	return page;

    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.service.OrgDemocracySumService#findAll()
     */
    public List findAll() {
	return orgDemocracySumDao.findAll();
    }
}
